package generator.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 
 * @TableName course_instructors
 */
@Data
public class CourseInstructors {
    /**
     * 
     */
    private Integer id;

    /**
     * 关联系统用户ID（原外键，现保留字段）
     */
    private Integer userId;

    /**
     * 讲师真实姓名
     */
    private String name;

    /**
     * 讲师展示名
     */
    private String displayName;

    /**
     * 讲师头像URL
     */
    private String avatar;

    /**
     * 讲师头衔
     */
    private String title;

    /**
     * 讲师简介
     */
    private String introduction;

    /**
     * 擅长领域
     */
    private Object specialty;

    /**
     * 最高学历
     */
    private Object education;

    /**
     * 资质证书
     */
    private Object certificates;

    /**
     * 教学年限
     */
    private Integer teachingExperience;

    /**
     * 主讲课程数量
     */
    private Integer courseCount;

    /**
     * 平均评分
     */
    private BigDecimal averageRating;

    /**
     * 讲师状态
     */
    private Object status;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    private LocalDateTime updatedAt;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CourseInstructors other = (CourseInstructors) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getDisplayName() == null ? other.getDisplayName() == null : this.getDisplayName().equals(other.getDisplayName()))
            && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getIntroduction() == null ? other.getIntroduction() == null : this.getIntroduction().equals(other.getIntroduction()))
            && (this.getSpecialty() == null ? other.getSpecialty() == null : this.getSpecialty().equals(other.getSpecialty()))
            && (this.getEducation() == null ? other.getEducation() == null : this.getEducation().equals(other.getEducation()))
            && (this.getCertificates() == null ? other.getCertificates() == null : this.getCertificates().equals(other.getCertificates()))
            && (this.getTeachingExperience() == null ? other.getTeachingExperience() == null : this.getTeachingExperience().equals(other.getTeachingExperience()))
            && (this.getCourseCount() == null ? other.getCourseCount() == null : this.getCourseCount().equals(other.getCourseCount()))
            && (this.getAverageRating() == null ? other.getAverageRating() == null : this.getAverageRating().equals(other.getAverageRating()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getDisplayName() == null) ? 0 : getDisplayName().hashCode());
        result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getIntroduction() == null) ? 0 : getIntroduction().hashCode());
        result = prime * result + ((getSpecialty() == null) ? 0 : getSpecialty().hashCode());
        result = prime * result + ((getEducation() == null) ? 0 : getEducation().hashCode());
        result = prime * result + ((getCertificates() == null) ? 0 : getCertificates().hashCode());
        result = prime * result + ((getTeachingExperience() == null) ? 0 : getTeachingExperience().hashCode());
        result = prime * result + ((getCourseCount() == null) ? 0 : getCourseCount().hashCode());
        result = prime * result + ((getAverageRating() == null) ? 0 : getAverageRating().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", name=").append(name);
        sb.append(", displayName=").append(displayName);
        sb.append(", avatar=").append(avatar);
        sb.append(", title=").append(title);
        sb.append(", introduction=").append(introduction);
        sb.append(", specialty=").append(specialty);
        sb.append(", education=").append(education);
        sb.append(", certificates=").append(certificates);
        sb.append(", teachingExperience=").append(teachingExperience);
        sb.append(", courseCount=").append(courseCount);
        sb.append(", averageRating=").append(averageRating);
        sb.append(", status=").append(status);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append("]");
        return sb.toString();
    }
}